//
//  LOLMinePager.m
//  LOL_Little_Box
//
//  Created by dllo on 16/3/23.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "LOLMinePager.h"
#import "LOLMineSettingPager.h"
#import "LOLUserMessageView.h"

@interface LOLMinePager ()<LOLUserMessageViewDelegate>

@property (nonatomic , retain)LOLUserMessageView *userView;

@end

@implementation LOLMinePager

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    /**设置右按钮 */
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithImage:[[UIImage imageNamed:@"personal_setting_nor@2x"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] style:UIBarButtonItemStylePlain target:self action:@selector(clickOnSystemRightBtn)];
    self.navigationItem.title = @"我";
    //219 170 102
    /**设置字体颜色 */
    [self.navigationController.navigationBar setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor colorWithRed:219/255.0 green:170/255.0 blue:102/255.0 alpha:1.0], NSForegroundColorAttributeName,nil]];
    /**添加下面的信息视图 */
    CGRect frame = self.view.frame;
    frame.size.height = 100;
    frame.origin = CGPointMake(0, 0);
    self.userView = [[LOLUserMessageView alloc]initWithFrame:frame];
    [self.view addSubview:self.userView];
    self.userView.delegate = self;
    // Do any additional setup after loading the view.
}

- (void)jumpToUserDetialPager{
    NSLog(@"跳转到用户的详情界面");
}

- (void)clickOnSystemRightBtn{
/**作用是跳转到设置界面 */
    LOLMineSettingPager *pager = [[LOLMineSettingPager alloc]init];
    pager.model = [[LOLModelUser alloc]initWithRegion:@"巨龙之巢" AccountNumber:@"2237296518"];
    [self.navigationController pushViewController:pager animated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
